<template>

  <!--单张图片上传-->
  <el-upload
      v-model:file-list="uploadList"
      :action="uploadUrl"
      list-type="picture-card"
      :limit="1"
      :on-success="uploadSuccess"
  >
    <el-icon>
      <Plus/>
    </el-icon>
  </el-upload>


</template>


<script setup>
import {onMounted, reactive, ref} from "vue";


const uploadList = ref([]);
const uploadUrl = import.meta.env.VITE_BASE_URL + "/system/file/local/easyUpload";
const uploadSuccess = (response, uploadFile, uploadFiles) => {
  if (response.success) {
    form.value.img = response.data;
  }
};


uploadList.value = [];

</script>
